### Example 1

library(phom)

N <- 50

x1 <- rnorm(N) * 0.1
y1 <- rnorm(N) * 0.1
X1 <- t(as.matrix(rbind(x1, y1)))

x2 <- rnorm(N) * 0.1 + 0.5
y2 <- rnorm(N) * 0.1 + 0.5
X2 <- t(as.matrix(rbind(x2, y2)))

x <- cbind(x1, x2)
y <- cbind(y1, y2)

X <- as.matrix(rbind(X1, X2))

plot(X)

max_dim <- 0
max_f <- 0.5

intervals <- pHom(X, max_dim, max_f, metric="euclidean")

plotBarcodeDiagram(intervals, max_dim, max_f, 
	title="Mixture of Gaussians Example")


	
